<template>
    <div style='background-color:teal'>
        我是又一个活泼可爱的组件
        <p>{{ message }} </p>
        <button @click="greet()">问候</button>

    </div>
</template>
<script>
export default {
    data(){
        return{
            message:'hello,friend'
        }
    },
    methods: {
        greet(){
        this.message="hello,"+this.$attrs.name+"!"
        }
    }
}
</script>